/**
 * @param {string} s
 * @return {string}
 */
var reverseWords = function(s) {
  var str = '';
  s.split(" ").find(x=>{
      var arr = x.split("");
      var len = arr.length;
      //for(let i=0; i<=len/2<<0;i++){
       // [arr[len-i],arr[i]]=[arr[i],arr[len-i]]	
       //}
      
      str+= arr.reverse().join("")+' '
  })
 return str.substring(0, str.length-1);
};


reverseWords("Let's take LeetCode contest");

